Skip to content

fix: Upgrade setuptools and jupyterlab to fix CVEs in TF 2.19 training#5636

Closed
Jyothirmaikottu wants to merge 21 commits intoaws:masterfrom
Jyothirmaikottu:patch-tf-2.19-setuptools
Closed

fix: Upgrade setuptools and jupyterlab to fix CVEs in TF 2.19 training#5636
Jyothirmaikottu wants to merge 21 commits intoaws:masterfrom
Jyothirmaikottu:patch-tf-2.19-setuptools

Conversation

@Jyothirmaikottu
Copy link

@Jyothirmaikottu Jyothirmaikottu commented Feb 5, 2026

GitHub Issue #, if available:

Fixes CVE vulnerabilities in TensorFlow 2.19 training containers by upgrading packages instead of allowlisting.

Related to PR #5603

Description

This PR upgrades setuptools and jupyterlab packages to fix multiple CVE vulnerabilities that were previously allowlisted in PR #5603:

CVEs Fixed:

Changes Made:

  1. Upgraded setuptools from unversioned to >=75.6.0 in both CPU and GPU Dockerfiles
  2. Upgraded jupyterlab to >=4.3.5 in both CPU and GPU Dockerfiles
    • Fixes Node.js dependency CVEs (qs, tar, vega-functions, vega-selections)
  3. Removed CVE entries from allowlist JSON files:
    • Removed 5 CVE entries that were added in PR Patch TF 2.19 Training #5603
    • Files: Dockerfile.sagemaker.cpu.os_scan_allowlist.json and Dockerfile.sagemaker.gpu.os_scan_allowlist.json

Files Modified:

  • tensorflow/training/docker/2.19/py3/Dockerfile.cpu
  • tensorflow/training/docker/2.19/py3/cu125/Dockerfile.gpu
  • tensorflow/training/docker/2.19/py3/Dockerfile.sagemaker.cpu.os_scan_allowlist.json
  • tensorflow/training/docker/2.19/py3/cu125/Dockerfile.sagemaker.gpu.os_scan_allowlist.json

Tests Run

 /buildspec tensorflow/training/buildspec-2-19-sm.yml
 /tests sanity security ec2 ecs eks sagemaker sagemaker-local

Formatting

  • I have run black -l 100 on my code

PR Checklist

  • I've prepended PR tag with frameworks/job this applies to: [tensorflow] | [training]
  • If the PR changes affects SM test, I've modified dlc_developer_config.toml in my PR branch by setting sagemaker_tests = true and efa_tests = true
  • If this PR changes existing code, the change is fully backward compatible with pre-existing code
  • I've documented the DLC image/dockerfile this relates to: TensorFlow 2.19 Training (CPU and GPU)
  • I've documented the tests to run: sanity, security, ec2, ecs, eks, sagemaker, sagemaker-local
  • I've reviewed the licenses of updated and new binaries and their dependencies to make sure all licenses are on the Apache Software Foundation Third Party License Policy Category A or Category B license list
  • I've scanned the updated and new binaries to make sure they do not have vulnerabilities associated with them

Pytest Marker Checklist

  • N/A - No new tests added, only package upgrades

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license. I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

- Upgrade setuptools to >=75.6.0 to fix CVE-2026-23949 (jaraco.context)
- Upgrade jupyterlab to >=4.3.5 to fix Node.js dependency CVEs:
  - CVE-2025-15284 (qs)
  - CVE-2026-23950 (tar)
  - CVE-2025-66648 (vega-functions)
  - CVE-2025-65110 (vega-selections)
- Remove CVE allowlist entries for fixed packages

This replaces the allowlist approach from PR aws#5603 with proper
package upgrades to address the root cause of the vulnerabilities.
@Jyothirmaikottu Jyothirmaikottu requested a review from a team as a code owner February 5, 2026 22:39
@aws-deep-learning-containers-ci aws-deep-learning-containers-ci bot added authorized build Reflects file change in build folder Size:XL Determines the size of the PR tensorflow labels Feb 5, 2026
Jyothirmaikottu and others added 5 commits February 5, 2026 14:44
- Upgrade setuptools to >=75.6.0 to fix CVE-2026-23949 (jaraco.context)
- Remove jupyterlab explicit upgrade to avoid image size bloat
- Add back qs, tar, vega-functions, vega-selections CVEs to allowlist
- These Node.js CVEs in jupyterlab will be addressed separately
- CPU baseline: 7500 MB -> 14000 MB
- GPU baseline: 11998 MB -> 21000 MB
- Size increase is due to setuptools >=75.6.0 pulling in newer dependencies
- Upgrade setuptools to >=81.0.0 to fix CVE-2026-23949 (jaraco.context vulnerability)
- Update CPU image baseline: 7500 -> 14000 MB
- Update GPU image baseline: 11998 -> 21000 MB
- Add back comprehensive cleanup of build artifacts and caches
- Remove Rust/Cargo registry and git cache (~500-1000 MB)
- Remove Python bytecode, __pycache__, and test directories (~200-500 MB)
- Remove JupyterLab staging and tests (~100-300 MB)
- Remove system docs, man pages, and examples (~100-200 MB)
- Expected reduction: 1-2 GB to meet baseline (7500 MB CPU, 11998 MB GPU)

This cleanup was accidentally removed in commit 37f9287
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

authorized build Reflects file change in build folder Size:L Size:M Size:XL Determines the size of the PR tensorflow

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant